/*
 * Copyright (c) 2019-present, Jhuix (Hui Jin) <jhuix0117@gmail.com>. All rights reserved.
 * Use of this source code is governed by a MIT license that can be found in the LICENSE file.
 */
.showdowns {
  position: relative;
  margin-left: 1rem;
  flex-grow: 1;
  min-width: 300px;

  div,
  dl,
  dt,
  dd,
  ul,
  ol,
  li,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  pre,
  form,
  p,
  blockquote,
  th,
  td {
    margin: 0;
    padding: 0;
  }

  p,
  li,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  div.paragraph {
    &.align-right {
      text-align: right;
    }

    &.align-center {
      text-align: center;
    }
  }

  a {
    color: #0366d6;
    line-height: inherit;
    text-decoration: none;
  }

  a img {
    border: none;
  }

  a:hover {
    cursor: pointer;
    text-decoration: underline;
  }

  img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: inherit;
  }

  img {
    -ms-interpolation-mode: bicubic;
  }

  p {
    font-family: inherit;
    font-size: 1em;
    font-weight: normal;
    line-height: 1.5;
    margin-bottom: 1.25em;
    text-rendering: optimizeLegibility;
  }

  p.lead {
    font-size: 1.21875em;
    line-height: 1.5;
  }

  p aside {
    font-size: 0.875em;
    font-style: italic;
    line-height: 1.5;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-style: normal;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    text-rendering: optimizeLegibility;
  }

  h1 small,
  h2 small,
  h3 small,
  h4 small,
  h5 small,
  h6 small {
    font-size: 60%;
    line-height: 0;
  }

  h1,
  h2 {
    padding-bottom: 0.3em;
    border-bottom: 1px solid #d6d6d6;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  h3 {
    font-size: 2.4rem;
  }

  h4 {
    font-size: 2rem;
  }

  h5 {
    font-size: 1.8rem;
  }

  h6 {
    font-size: 1.6rem;
    color: #6a737d;
  }

  .subheader {
    line-height: 1.4;
    color: #6f6f6f;
    font-weight: normal;
    margin-top: 0.2em;
    margin-bottom: 0.5em;
  }

  hr {
    border: solid #ddd;
    border-width: 1px 0 0;
    clear: both;
    height: 0;
    margin: 1.25em 0 1.1875em;
  }

  em,
  i {
    font-style: italic;
    line-height: inherit;
  }

  strong,
  b {
    font-weight: 600;
    line-height: inherit;
  }

  small {
    font-size: 60%;
    line-height: inherit;
  }

  code {
    border-style: solid;
    border-width: 1px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-weight: normal;
    padding: 0.125em 0.3125em 0.0625em;
  }

  ul,
  ol,
  dl {
    font-family: inherit;
    font-size: 1em;
    line-height: 1.5;
    list-style-position: outside;
    margin-bottom: 1.25em;
  }

  ul {
    margin-left: 1.1em;
  }

  ul.no-bullet {
    margin-left: 0;
  }

  ul.no-bullet li ul,
  ul.no-bullet li ol {
    margin-left: 1.25em;
    margin-bottom: 0;
    list-style: none;
  }

  ul li ul,
  ul li ol {
    margin-left: 1.25em;
    margin-bottom: 0;
  }

  ul.square li ul,
  ul.circle li ul,
  ul.disc li ul {
    list-style: inherit;
  }

  ul.square {
    list-style-type: square;
    margin-left: 1.1em;
  }

  ul.circle {
    list-style-type: circle;
    margin-left: 1.1em;
  }

  ul.disc {
    list-style-type: disc;
    margin-left: 1.1em;
  }

  ul.no-bullet {
    list-style: none;
  }

  ol {
    margin-left: 1.4em;
  }

  ol li ul,
  ol li ol {
    margin-left: 1.25em;
    margin-bottom: 0;
  }

  dl dt {
    margin-bottom: 0.3em;
    font-weight: 600;
  }

  dl dd {
    margin-bottom: 0.75em;
  }

  abbr,
  acronym {
    text-transform: uppercase;
    font-size: 90%;
    color: #222;
    cursor: help;
  }

  abbr {
    text-transform: none;
  }

  abbr[title] {
    border-bottom: 1px dotted #5c5c5c;
  }

  blockquote {
    margin: 0 0 16px 0;
    padding: 0 15px;
    line-height: 1.5;
    color: #5c5c5c;
    border-left: 4px solid #d6d6d6;
  }

  blockquote cite {
    display: block;
    font-size: 0.8125em;
    color: #555;
  }

  blockquote cite:before {
    content: "\2014 \0020";
  }

  blockquote cite a,
  blockquote cite a:visited {
    color: #555;
  }

  pre {
    /* css-3 */
    white-space: -moz-pre-wrap;
    /* Mozilla, since 1999 */
    white-space: -pre-wrap;
    /* Opera 4-6 */
    white-space: -o-pre-wrap;
    white-space: pre-wrap;
    /* Opera 7 */
    word-wrap: break-word;
    /* Internet Explorer 5.5+ */
    border: 1px solid #dfdfdf;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    padding: 0.125em 0.3125em 0.0625em;
  }

  pre code {
    background-color: transparent;
    border: 0;
    padding: 0;
  }

  table {
    background: #fff;
    margin-bottom: 1.25em;
    table-layout: auto;
    overflow: auto;
    border-collapse: collapse;
    border-spacing: 0;
  }

  table caption {
    background: transparent;
    color: #222;
    font-weight: 600;
  }

  table thead {
    background: #f5f5f5;
  }

  table thead tr th,
  table thead tr td {
    color: #222;
    font-weight: 600;
    line-height: 1.125em;
    border: 1px solid #d6d6d6;
    padding: 0.5em 0.625em 0.625em;
  }

  table tfoot {
    background: #f5f5f5;
  }

  table tfoot tr th,
  table tfoot tr td {
    color: #222;
    font-weight: 600;
    line-height: 1.125em;
    border: 1px solid #d6d6d6;
    padding: 0.5em 0.625em 0.625em;
  }

  table tr th,
  table tr td {
    color: #222;
    line-height: 1.125em;
    border: 1px solid #d6d6d6;
    padding: 0.5625em 0.625em;
  }

  table tr.even,
  table tr.alt,
  table tr:nth-of-type(even) {
    background: #f9f9f9;
  }

  table tbody tr th,
  table tbody tr td {
    line-height: 1.125em;
    border: 1px solid #d6d6d6;
  }

  .plantuml,
  .mermaid,
  .flow,
  .flowchart,
  .sequence,
  .wavedrom {
    background-color: #f9f9f9;
  }

  .diagram-center:not(.asciimath):not(.latex):not(.mermaid) {
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .diagram-right:not(.asciimath):not(.latex):not(.mermaid) {
    display: flex;
    justify-content: right;
    margin: auto 0 auto auto;
  }

  .diagram-center.mermaid {
    text-align: center;
  }

  .diagram-right.mermaid {
    text-align: right;
  }

  .asciimath:not(.diagram-center):not(.diagram-right),
  .latex:not(.diagram-center):not(.diagram-right) {
    .katex-display,
    .katex {
      text-align: unset;
    }
  }

  .asciimath.diagram-center,
  .latex.diagram-center {
    .katex-display,
    .katex {
      text-align: center;
    }
  }

  .asciimath.diagram-right,
  .latex.diagram-right {
    .katex-display,
    .katex {
      text-align: right;
    }
  }
}
